{extend name="admin@public/base" /}
{block name="main-content"}
	<div class="page-content">
		<!--主题-->
		<div class="page-header">
			<h1>
				您当前操作
				<small>
					<i class="ace-icon fa fa-angle-double-right"></i>
					查看编辑订单
				</small>
			</h1>
		</div>
		<div class="row">
			<div class="col-xs-12">
				<form class="form-horizontal ajaxForm2" name="form0" method="post" action="{:url('admin/Goods/order_list_runedit')}"  enctype="multipart/form-data">
                <input type="hidden" name="id" id="id" value="{$info.id}" />
                     <ul class="nav nav-tabs padding-18 tab-size-bigger" id="myTab">
										<li class="active">
											<a data-toggle="tab" href="#order-tab-1" aria-expanded="true"> 
												订单信息
											</a>
										</li>

										<li class="">
											<a data-toggle="tab" href="#order-tab-2" aria-expanded="false">
												收件信息
											</a>
										</li>
                                        
                                        <li class="">
											<a data-toggle="tab" href="#order-tab-3" aria-expanded="false">
												商品信息
											</a>
										</li>
                     </ul>

						 <div class="tab-content no-border padding-24">
                         
                             <div id="order-tab-1" class="tab-pane fade active in">
                       
                       <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1">订单编号：  </label>
						<div class="col-sm-10  col-sm-6">
							<input type="text" disabled="disabled" name="order[sn]"  value="{$info.sn}"   class="col-sm-10  col-sm-6"/>
						</div>
					</div>
					<div class="space-4"></div>
                                
                    <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1">订购数量：  </label>
						<div class="col-sm-10  col-sm-6">
							<input type="text" name="order[number]"  value="{$info.number}"   class="col-sm-2  col-sm-2"/>
						</div>
					</div>
					<div class="space-4"></div>     
                                
                    <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1">订单总价：  </label>
						<div class="col-sm-10  col-sm-6">
							<input type="text" name="order[total_fee]"  value="{$info.total_fee}" class="col-sm-2  col-sm-2"/>
						</div>
					</div>
					<div class="space-4"></div> 
                    
                     <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1">付款状态：  </label>    
                        <div class="col-sm-2  col-sm-2"> 
                            <select name="order[state_pay]" id="order_state_pay"  class="form-control col-sm-1  col-sm-1">
                            <option value="">付款状态</option>
                            {foreach name="state_pay_list" item="spay" key="spkey"}
						    <option value="{$spkey}" {if condition="$info['state_pay'] eq $spkey"}selected="selected"{/if}>{$spay}</option>
                            {/foreach}
                            </select>
                            
						</div>
					</div>
                    
					<div class="space-4"></div>  
                      
                     <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1">交易状态：  </label>    
                        <div class="col-sm-2  col-sm-2"> 
                            <select name="order[state_trade]" id="order_state_trade" class="form-control col-sm-1  col-sm-1">
                            <option value="">交易状态</option>
                            {foreach name="state_trade_list"   item="stpay" key="stkey"}
						    <option value="{$stkey}" {if condition="$info['state_trade'] eq $stkey"}selected="selected"{/if}>{$stpay}</option>
                            {/foreach}
                            </select>
						</div>
					</div>
                    
                    <div style="{if condition="$info['state_trade'] lt 2"} display:none {/if}" id="state_trade_div">
                    
                    <div class="space-4"></div>               
                    <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1">快递单号：  </label>
						<div class="col-sm-10  col-sm-6">
							<input type="text" name="order[express_code]"  value="{$info.express_code}" class="col-sm-4  col-sm-4"/>
						</div>
					</div>
                    
                    <div class="space-4"></div>               
                    <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1">快递描述：  </label>
						<div class="col-sm-10  col-sm-6">
                        <textarea name="order[express]" id="order_express" class="col-sm-10  col-sm-10" placeholder="可填写所发快递名称，备注收件信息等">{$info.express}</textarea>
						</div>
					</div>
                    
                    
                    </div>
                     <script language="javascript">
                       $(function(){
					       $("#order_state_trade").change(function(){
						       parseInt($(this).val()) > 2 ? $("#state_trade_div").show():$("#state_trade_div").hide();
						   });
					   });
                    </script>
                    
                    
					<div class="space-4"></div>   
                        
                       <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1">提交时间：  </label>    
                        <div class="col-sm-2  col-sm-2"> 
                            <label class="control-label no-padding-right"><?php echo date('Y-m-d H:i:s',$info['add_time']);?></label>
						</div>
					</div>
					<div class="space-4"></div>  
                                
                                
                             </div>
                             
                             
                             <!--收件信息部分-->
                             <div id="order-tab-2" class="tab-pane fade">
                               
                    <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 收件人：  </label>
						<div class="col-sm-10  col-sm-6">
							<input type="text" name="address_cache[man]"  value="{$info.address_cache.man}"   class="col-sm-10  col-sm-6"/>
						</div>
					</div>
					<div class="space-4"></div>
                     <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 收件电话：  </label>
						<div class="col-sm-10  col-sm-6">
							<input type="text" name="address_cache[mobile]"  value="{$info.address_cache.mobile}"   class="col-sm-10  col-sm-6"/>
						</div>
					</div>
					<div class="space-4"></div>        
                    
                    <div class="form-group form-inline">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 收件地区：  </label>
						<div class="col-sm-7  col-sm-7">
							 <select name="address_cache[province]" class="form-control" id="province" onChange="loadRegion('province',2,'city','{:url('admin/Ajax/getRegion')}');">
										<option value="0">省</option>
										{volist name="province" id="vo"}
											<option value="{$vo.id}" {if condition="$info['address_cache']['province'] eq $vo['id']"}selected{/if}>{$vo.name}</option>
										{/volist}
							 </select>
                              <select name="address_cache[city]" class="form-control" id="city"  onchange="loadRegion('city',3,'town','{:url('admin/Ajax/getRegion')}');">
										<option  value="0">市</option>
										{foreach name="city" item="v"}
											<option {if condition="$info['address_cache']['city'] eq $v['id']"}selected{/if} value="{$v.id}">{$v.name}</option>
										{/foreach}
							 </select>  
                             <select name="address_cache[district]" class="form-control" id="town">
										<option value="0">区</option>
										{volist name="district" id="vy"}
											<option {if condition="$info['address_cache']['district'] eq $vy['id']"}selected{/if} value="{$vy.id}">{$vy.name}</option>
										{/volist}
							 </select>
                   
						</div>
 
                        
					</div>
					<div class="space-4"></div>  
                    <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 收件地址：  </label>
						<div class="col-sm-10  col-sm-6">
							<input type="text" name="address_cache[address]"  value="{$info.address_cache.address}"   class="col-sm-10  col-sm-6"/>
						</div>
					</div>
					<div class="space-4"></div>
                             
                             
                             
                             </div>
                             
                             
                             
                             
                             <!--商品信息部分-->
                             <div id="order-tab-3" class="tab-pane fade">
                                   <div class="form-group">
						                <label class="col-sm-2 control-label no-padding-right" for="form-field-1">商品名称：</label>
                                        <div class="col-sm-10">{$info.goods.goods_title}</div>
					               </div>
                                   <div class="space-4"></div>
                                   
                                   <div class="form-group">
						 <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 成本价：  </label>
						<div class="col-xs-10 col-sm-1">
							<input type="number"  disabled name="price_cb" id="price_cb" value="{$info.goods.price_cb}" placeholder="产品成本价" />
						</div>
                        
					</div>
					<div class="space-4"></div>
                    
                     <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 销售价：  </label>
						<div class="col-sm-10 col-sm-1">
							<input type="number" disabled name="price" id="price" value="{$info.goods.price}"  placeholder="销售价" />
						</div>
                        
					</div>
					<div class="space-4"></div>
                                  
                     
                    
                    <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 佣金比率：  </label>
						<div class="col-sm-10  col-sm-6">
							<input type="text" name="percent" disabled id="percent" value="{$info.goods.percent}"   class="col-sm-10  col-sm-6" placeholder="佣金比率设置为一级:二级:三级,三值相加不得超过100."/>
						</div>
                        
					</div>
					<div class="space-4"></div>
                    
                    <div class="form-group">
						<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 商品库存：  </label>
						<div class="col-sm-10  col-sm-1">
							<input type="number" disabled name="count_goods" id="count_goods" value="{$info.goods.count_goods}"   placeholder="商品库存"/>
						</div>
                       
                        <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 已售数量：  </label>
						<div class="col-sm-10  col-sm-1">
							<input type="number" disabled name="count_already" id="count_already"  value="{$info.goods.count_already}"    placeholder="已售数量"/>
						</div> 
					</div>
					<div class="space-4"></div>
                                  
                                  
                                  
                             </div>
                            
                            
                            
                            
                            
                            
                            
                            
                             
                 
                
                         </div>
                
                
                
                
                
                
                 
					<div class="space-4"></div>

					<div class="clearfix form-actions">
						<div class="col-md-offset-3 col-md-9">
							 
							 
							<button class="btn btn-info" type="submit">
								<i class="ace-icon fa fa-check bigger-110"></i>
								修改
							</button>

							 
						</div>
					</div>
				</form>
			</div>
		</div>
        
       
        
        
        
        
        

	</div><!-- /.page-content -->
{/block}
{block name="scripts"}
<script type="text/javascript" src="__PUBLIC__/others/region.js"></script>
	<script>
			//多图设置
			$("#pic_list").hide();
			$("#news_pic_list").click(function(){
				$("#pic_list").hide();
			});
			$("#news_pic_qqlist").click(function(){
				$("#pic_list").show();
			});
			//跳转额外属性
			$("#pptaddress").hide();
			$("#news_flag_vaj").click(function(){
				$("#pptaddress").toggle(400);
			});
			 
			$('.date-picker').datepicker({
					autoclose: true,
					todayHighlight: true,
					language:'zh-CN',
				})
	</script>
{/block}